/*
* fbank.com Inc.
* Copyright (c) 2020 All Rights Reserved.
* create by fm
* date:2020-04-26
*/
package com.ouwen.smartpay.entity;


import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.fm.common.emuns.MessageType;
import com.fm.common.emuns.TaskExecuteStatus;
import com.fm.common.emuns.TaskStatus;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.*;
import javax.validation.constraints.*;

import com.fm.core.common.domain.AbstractEntity;
import java.util.Date;

/**
 * 异步通知消息表 Entity
 *
 * @author fm
 * Date: 2020-04-26 10:57:42
 */
@Setter
@Getter
@Entity
@Table(name = "openapi_notify_message")
public class NotifyMessage extends AbstractEntity {
	/** serialVersionUID */
	private static final long serialVersionUID = 1L;

	/** gid */
	@Size(max=40)
    private String gid;

	/** partner_id */
	@Size(max=40)
    private String partnerId;

	/**
	 * 子商户编码
	 */
	@Size(max = 32)
	private String subPartnerId;

	/** request_no */
	@Size(max=40)
    private String requestNo;

	/** merch_order_no */
	@Size(max=40)
    private String merchOrderNo;

	/** message_type */
	@Enumerated(EnumType.STRING)
    private MessageType messageType;

	/** service */
	@Size(max=32)
    private String serviceName;

	/** version */
	@Size(max=8)
    private String serviceVersion;

	/** version */
	@Size(max=100)
	private String serviceGroup;

	/** url */
	@NotEmpty
	@Size(max=255)
    private String notifyUrl;

	/** resp_info */
	@Size(max=200)
    private String respInfo;

	/** send_count */
	@NotNull
    private Integer sendCount;

	/** maxSendCount */
	@NotNull
    private Integer maxSendCount;

	/** next_send_time */
    private Date nextSendTime;

	/** tranStatus */
	@Enumerated(EnumType.STRING)
    private TaskStatus status;

	/** execute_status */
	@Enumerated(EnumType.STRING)
    private TaskExecuteStatus executeStatus;

}
